#===== VCMadd =====
from numpy import array, linspace
import matplotlib.pyplot as plt

VCMaddfHighEval = 44
VCMaddfLowEval = 153
VCMaddnIter = 11
VCMaddx0 = array([0.125338 ,0.625338	 ,0.775338	 ,0.735701	 ,0.735768	 ,0.761838	 ,0.752475	 ,0.757788	 ,0.756699	 ,0.756706	 ,0.757423	])
VCMaddfh = array([-0.937132 ,-1.088400	 ,-5.837692	 ,-5.789213	 ,-5.790583	 ,-6.009351	 ,-6.008741	 ,-6.020585	 ,-6.020579	 ,-6.020583	 ,-6.020724	])
VCMaddfl = array([1.534135 ,5.458501	 ,4.283855	 ,3.991004	 ,3.990850	 ,4.090026	 ,4.015432	 ,4.052009	 ,4.043304	 ,4.043358	 ,4.049023	])
VCMaddfs = array([-1.122490 ,-2.491790	 ,-6.605300	 ,-6.222870	 ,-6.222870	 ,-6.062968	 ,-6.032429	 ,-6.025083	 ,-6.020896	 ,-6.020896	 ,-6.020760	])
VCMaddrho = array([0.908771 ,0.097300	 ,0.860862	 ,-0.125860	 ,-0.122305	 ,0.761993	 ,-0.026433	 ,0.714066	 ,-0.018287	 ,-0.005184	 ,0.795729	])
VCMadderr = array([0.374662 ,0.500000	 ,0.150000	 ,0.039636	 ,0.039570	 ,0.013500	 ,0.009362	 ,0.004050	 ,0.001088	 ,0.001081	 ,0.000364	])
VCMadddelta = array([0.500000 ,0.150000	 ,0.150000	 ,0.045000	 ,0.013500	 ,0.013500	 ,0.004050	 ,0.004050	 ,0.001215	 ,0.000364	 ,0.000364	])
VCMaddfscaled = array([-1.715453 ,-1.961960	 ,-2.203523	 ,-2.435467	 ,-2.653745	 ,-2.854980	 ,-3.036496	 ,-3.196327	 ,-3.333209	 ,-3.446556	 ,-3.536421	 ,-3.603446	 ,-3.648794	 ,-3.674081	 ,-3.681290	 ,-3.672693	 ,-3.650758	 ,-3.618063	 ,-3.577212	 ,-3.530755	 ,-3.481110	 ,-3.430499	 ,-3.380891	 ,-3.333956	 ,-3.291030	 ,-3.253093	 ,-3.220759	 ,-3.194281	 ,-3.173562	 ,-3.158188	 ,-3.147455	 ,-3.140424	 ,-3.135966	 ,-3.132828	 ,-3.129690	 ,-3.125233	 ,-3.118201	 ,-3.107468	 ,-3.092094	 ,-3.071376	 ,-3.044897	 ,-3.012564	 ,-2.974626	 ,-2.931700	 ,-2.884765	 ,-2.835158	 ,-2.784547	 ,-2.734901	 ,-2.688444	 ,-2.647594	 ,-2.614899	 ,-2.592963	 ,-2.584366	 ,-2.591576	 ,-2.616862	 ,-2.662210	 ,-2.729235	 ,-2.819100	 ,-2.932447	 ,-3.069329	 ,-3.229160	 ,-3.410677	 ,-3.611912	 ,-3.830189	 ,-4.062134	 ,-4.303696	 ,-4.550203	 ,-4.796418	 ,-5.036626	 ,-5.264729	 ,-5.474361	 ,-5.659015	 ,-5.812181	 ,-5.927490	 ,-5.998869	 ,-6.020695	 ,-5.987947	 ,-5.896359	 ,-5.742562	 ,-5.524214	 ,-5.240119	 ,-4.890329	 ,-4.476220	 ,-4.000551	 ,-3.467497	 ,-2.882649	 ,-2.252994	 ,-1.586858	 ,-0.893827	 ,-0.184627	 ,0.529010	 ,1.234520	 ,1.918699	 ,2.567918	 ,3.168360	 ,3.706271	 ,4.168219	 ,4.541367	 ,4.813741	 ,4.974498	])
VCMaddxHist = array([0.500000 ,0.125338	 ,0.625338	 ,0.775338	 ,0.735701	 ,0.735768	 ,0.761838	 ,0.752475	 ,0.757788	 ,0.756699	 ,0.756706	 ,0.757423	])
VCMaddfHist = array([0.909297 ,-0.937132	 ,-1.088400	 ,-5.837692	 ,-5.789213	 ,-5.790583	 ,-6.009351	 ,-6.008741	 ,-6.020585	 ,-6.020579	 ,-6.020583	 ,-6.020724	])
#===== VCMmult =====
VCMmultfHighEval = 72
VCMmultfLowEval = 180
VCMmultnIter = 18
VCMmultx0 = array([0.000000 ,0.350000	 ,0.305000	 ,0.260000	 ,0.246500	 ,0.233000	 ,0.219500	 ,0.206000	 ,0.192500	 ,0.179000	 ,0.165500	 ,0.152000	 ,0.138500	 ,0.152000	 ,0.142550	 ,0.146600	 ,0.143765	 ,0.142914	])
VCMmultfh = array([3.027210 ,0.001987	 ,-0.009638	 ,-0.149215	 ,-0.234366	 ,-0.338297	 ,-0.456741	 ,-0.583162	 ,-0.708958	 ,-0.823796	 ,-0.916074	 ,-0.973495	 ,-0.983725	 ,-0.973495	 ,-0.986325	 ,-0.983925	 ,-0.986116	 ,-0.986309	])
VCMmultfl = array([2.513605 ,3.800993	 ,3.435181	 ,3.005392	 ,2.854817	 ,2.694851	 ,2.527630	 ,2.356419	 ,2.185521	 ,2.020102	 ,1.865963	 ,1.729253	 ,1.616137	 ,1.729253	 ,1.647237	 ,1.680837	 ,1.657062	 ,1.650161	])
VCMmultfs = array([-0.523551 ,0.206033	 ,-0.012510	 ,-0.049026	 ,-0.219766	 ,-0.323018	 ,-0.441756	 ,-0.569739	 ,-0.698752	 ,-0.818911	 ,-0.919019	 ,-0.986884	 ,-1.009575	 ,-1.006439	 ,-0.989470	 ,-0.986711	 ,-0.986372	 ,-0.986332	])
VCMmultrho = array([-1.478114 ,1.290141	 ,0.801859	 ,3.543663	 ,1.206943	 ,1.172355	 ,1.144833	 ,1.118784	 ,1.088299	 ,1.044425	 ,0.969069	 ,0.810910	 ,0.283545	 ,-0.450403	 ,0.452573	 ,-6.216208	 ,-4.485438	 ,-2.189531	])
VCMmulterr = array([0.500000 ,0.150000	 ,0.045000	 ,0.045000	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.004050	 ,0.004050	 ,0.001215	 ,0.000364	])
VCMmultdelta = array([0.150000 ,0.045000	 ,0.045000	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.004050	 ,0.004050	 ,0.001215	 ,0.000364	 ,0.000109	])
VCMmultfscaled = array([-2.543738 ,-2.304441	 ,-2.079731	 ,-1.873495	 ,-1.688510	 ,-1.526498	 ,-1.388200	 ,-1.273470	 ,-1.181388	 ,-1.110375	 ,-1.058326	 ,-1.022736	 ,-1.000830	 ,-0.989684	 ,-0.986341	 ,-0.987913	 ,-0.991670	 ,-0.995113	 ,-0.996036	 ,-0.992559	 ,-0.983160	 ,-0.966676	 ,-0.942298	 ,-0.909549	 ,-0.868250	 ,-0.818479	 ,-0.760520	 ,-0.694810	 ,-0.621881	 ,-0.542307	 ,-0.456652	 ,-0.365420	 ,-0.269022	 ,-0.167742	 ,-0.061716	 ,0.049071	 ,0.164790	 ,0.285745	 ,0.412358	 ,0.545127	 ,0.684587	 ,0.831264	 ,0.985615	 ,1.147981	 ,1.318531	 ,1.497207	 ,1.683686	 ,1.877338	 ,2.077204	 ,2.281982	 ,2.490028	 ,2.699370	 ,2.907749	 ,3.112659	 ,3.311420	 ,3.501256	 ,3.679392	 ,3.843159	 ,3.990110	 ,4.118145	 ,4.225633	 ,4.311536	 ,4.375529	 ,4.418108	 ,4.440688	 ,4.445673	 ,4.436523	 ,4.417776	 ,4.395054	 ,4.375032	 ,4.365380	 ,4.374661	 ,4.412207	 ,4.487951	 ,4.612230	 ,4.795564	 ,5.048394	 ,5.380816	 ,5.802285	 ,6.321310	 ,6.945153	 ,7.679520	 ,8.528269	 ,9.493136	 ,10.573488	 ,11.766107	 ,13.065019	 ,14.461375	 ,15.943385	 ,17.496311	 ,19.102533	 ,20.741676	 ,22.390822	 ,24.024776	 ,25.616422	 ,27.137134	 ,28.557260	 ,29.846656	 ,30.975282	 ,31.913829	])
VCMmultxHist = array([0.500000 ,0.000000	 ,0.350000	 ,0.305000	 ,0.260000	 ,0.246500	 ,0.233000	 ,0.219500	 ,0.206000	 ,0.192500	 ,0.179000	 ,0.165500	 ,0.152000	 ,0.138500	 ,0.142550	 ,0.146600	 ,0.143765	 ,0.142914	])
VCMmultfHist = array([0.909297 ,3.027210	 ,0.001987	 ,-0.009638	 ,-0.149215	 ,-0.234366	 ,-0.338297	 ,-0.456741	 ,-0.583162	 ,-0.708958	 ,-0.823796	 ,-0.916074	 ,-0.973495	 ,-0.983725	 ,-0.986325	 ,-0.983925	 ,-0.986116	 ,-0.986309	])
#===== VCMhybr =====
VCMhybrfHighEval = 44
VCMhybrfLowEval = 123
VCMhybrnIter = 11
VCMhybrx0 = array([0.122099 ,0.622099	 ,0.772099	 ,0.622099	 ,0.727099	 ,0.758599	 ,0.745099	 ,0.754549	 ,0.757384	 ,0.756169	 ,0.757019	])
VCMhybrfh = array([-0.915964 ,-0.954530	 ,-5.898302	 ,-0.954530	 ,-5.581393	 ,-6.019763	 ,-5.944766	 ,-6.016878	 ,-6.020730	 ,-6.020119	 ,-6.020712	])
VCMhybrfl = array([1.518810 ,5.499527	 ,4.227641	 ,5.499527	 ,4.026095	 ,4.058911	 ,3.988409	 ,4.027953	 ,4.048707	 ,4.039292	 ,4.045800	])
VCMhybrfs = array([-0.649378 ,-7.092258	 ,-6.082906	 ,-10.047597	 ,-6.716931	 ,-6.124576	 ,-6.049085	 ,-6.026475	 ,-6.021600	 ,-6.020985	 ,-6.020790	])
VCMhybrrho = array([1.171033 ,0.006244	 ,0.964003	 ,-1.191473	 ,-0.387122	 ,0.536785	 ,-2.557654	 ,-0.429792	 ,0.526720	 ,-2.396426	 ,-0.304956	])
VCMhybrerr = array([0.377901 ,0.500000	 ,0.150000	 ,0.150000	 ,0.045000	 ,0.013500	 ,0.013500	 ,0.004050	 ,0.001215	 ,0.001215	 ,0.000364	])
VCMhybrdelta = array([0.500000 ,0.150000	 ,0.150000	 ,0.045000	 ,0.013500	 ,0.013500	 ,0.004050	 ,0.001215	 ,0.001215	 ,0.000364	 ,0.000109	])
VCMhybrfscaled = array([-5.501245 ,-5.273066	 ,-5.056671	 ,-4.858072	 ,-4.682173	 ,-4.532756	 ,-4.412495	 ,-4.322998	 ,-4.264871	 ,-4.237798	 ,-4.240644	 ,-4.271564	 ,-4.328124	 ,-4.407429	 ,-4.506248	 ,-4.621144	 ,-4.748589	 ,-4.885084	 ,-5.027256	 ,-5.171951	 ,-5.316310	 ,-5.457828	 ,-5.594401	 ,-5.724353	 ,-5.846448	 ,-5.959886	 ,-6.064289	 ,-6.159667	 ,-6.246377	 ,-6.325073	 ,-6.396646	 ,-6.462165	 ,-6.522807	 ,-6.579791	 ,-6.634319	 ,-6.687512	 ,-6.740356	 ,-6.793658	 ,-6.848006	 ,-6.903742	 ,-6.960946	 ,-7.019428	 ,-7.078734	 ,-7.138162	 ,-7.196787	 ,-7.253493	 ,-7.307020	 ,-7.356006	 ,-7.399047	 ,-7.434746	 ,-7.461771	 ,-7.478914	 ,-7.485136	 ,-7.479622	 ,-7.461814	 ,-7.431451	 ,-7.388587	 ,-7.333607	 ,-7.267227	 ,-7.190490	 ,-7.104742	 ,-7.011601	 ,-6.912920	 ,-6.810732	 ,-6.707197	 ,-6.604534	 ,-6.504955	 ,-6.410593	 ,-6.323432	 ,-6.245236	 ,-6.177487	 ,-6.121320	 ,-6.077481	 ,-6.046279	 ,-6.027564	 ,-6.020704	 ,-6.024594	 ,-6.037659	 ,-6.057890	 ,-6.082888	 ,-6.109917	 ,-6.135980	 ,-6.157901	 ,-6.172419	 ,-6.176290	 ,-6.166391	 ,-6.139833	 ,-6.094067	 ,-6.026992	 ,-5.937052	 ,-5.823324	 ,-5.685598	 ,-5.524432	 ,-5.341201	 ,-5.138110	 ,-4.918202	 ,-4.685326	 ,-4.444095	 ,-4.199807	 ,-3.958350	])
VCMhybrxHist = array([0.500000 ,0.122099	 ,0.622099	 ,0.772099	 ,0.727099	 ,0.758599	 ,0.745099	 ,0.754549	 ,0.757384	 ,0.756169	 ,0.757019	])
VCMhybrfHist = array([0.909297 ,-0.915964	 ,-0.954530	 ,-5.898302	 ,-5.581393	 ,-6.019763	 ,-5.944766	 ,-6.016878	 ,-6.020730	 ,-6.020119	 ,-6.020712	])
#===== AVCMadd =====
AVCMaddfHighEval = 14
AVCMaddfLowEval = 94
AVCMaddnIter = 6
AVCMaddx0 = array([0.125338 ,0.086975	 ,0.179325	 ,0.144282	 ,0.142201	 ,0.142582	])
AVCMaddfh = array([-0.937132 ,-0.402531	 ,-0.821251	 ,-0.985893	 ,-0.986302	 ,-0.986325	])
AVCMaddfl = array([1.534135 ,1.494532	 ,2.023972	 ,1.661310	 ,1.644456	 ,1.647495	])
AVCMaddfs = array([-1.122490 ,-1.061973	 ,-1.185383	 ,-1.001363	 ,-0.986585	 ,-0.986324	])
AVCMaddrho = array([0.908771 ,-4.282242	 ,-0.466791	 ,0.759148	 ,0.592066	 ,1.048066	])
AVCMadderr = array([0.374662 ,0.038363	 ,0.053987	 ,0.018944	 ,0.002081	 ,0.000381	])
AVCMadddelta = array([0.500000 ,0.150000	 ,0.045000	 ,0.045000	 ,0.045000	 ,0.045000	])
AVCMaddfscaled = array([2.106870 ,1.820886	 ,1.520370	 ,1.210274	 ,0.896127	 ,0.584281	 ,0.282037	 ,-0.002506	 ,-0.260960	 ,-0.485542	 ,-0.670184	 ,-0.811499	 ,-0.909233	 ,-0.965957	 ,-0.986117	 ,-0.974880	 ,-0.937266	 ,-0.877835	 ,-0.800838	 ,-0.710501	 ,-0.611172	 ,-0.507235	 ,-0.402855	 ,-0.301683	 ,-0.206655	 ,-0.119885	 ,-0.042671	 ,0.024427	 ,0.081486	 ,0.129098	 ,0.168260	 ,0.200273	 ,0.226643	 ,0.249001	 ,0.269022	 ,0.288355	 ,0.308553	 ,0.331012	 ,0.356914	 ,0.387178	 ,0.422416	 ,0.462898	 ,0.508533	 ,0.558854	 ,0.613015	 ,0.669803	 ,0.727660	 ,0.784714	 ,0.838828	 ,0.887649	 ,0.928679	 ,0.959346	 ,0.977086	 ,0.979432	 ,0.964100	 ,0.929083	 ,0.872739	 ,0.793870	 ,0.691804	 ,0.566455	 ,0.418377	 ,0.248807	 ,0.059686	 ,-0.146332	 ,-0.365891	 ,-0.594961	 ,-0.828882	 ,-1.062431	 ,-1.289904	 ,-1.505212	 ,-1.701999	 ,-1.873764	 ,-2.014003	 ,-2.116353	 ,-2.174746	 ,-2.183561	 ,-2.137781	 ,-2.033145	 ,-1.866284	 ,-1.634859	 ,-1.337677	 ,-0.974791	 ,-0.547578	 ,-0.058799	 ,0.487370	 ,1.085338	 ,1.728116	 ,2.407377	 ,3.113535	 ,3.835864	 ,4.562630	 ,5.281270	 ,5.978579	 ,6.640928	 ,7.254499	 ,7.805538	 ,8.280614	 ,8.666887	 ,8.952385	 ,9.126265	])
AVCMaddxHist = array([0.500000 ,0.125338	 ,0.086975	 ,0.179325	 ,0.144282	 ,0.142201	 ,0.142582	])
AVCMaddfHist = array([0.909297 ,-0.937132	 ,-0.402531	 ,-0.821251	 ,-0.985893	 ,-0.986302	 ,-0.986325	])
#===== AVCMmult =====
AVCMmultfHighEval = 26
AVCMmultfLowEval = 132
AVCMmultnIter = 12
AVCMmultx0 = array([0.000000 ,0.613172	 ,0.658172	 ,0.671672	 ,0.685172	 ,0.698672	 ,0.712172	 ,0.725672	 ,0.739172	 ,0.752672	 ,0.757203	 ,0.757254	])
AVCMmultfh = array([3.027210 ,-0.605496	 ,-2.607273	 ,-3.274860	 ,-3.931378	 ,-4.548323	 ,-5.095360	 ,-5.541404	 ,-5.855820	 ,-6.009701	 ,-6.020739	 ,-6.020740	])
AVCMmultfl = array([2.513605 ,5.602625	 ,4.961736	 ,4.735943	 ,4.515684	 ,4.315211	 ,4.149693	 ,4.034671	 ,3.985463	 ,4.016522	 ,4.047256	 ,4.047661	])
AVCMmultfs = array([-0.523551 ,0.799011	 ,-0.958741	 ,-3.206802	 ,-3.943179	 ,-4.567078	 ,-5.106658	 ,-5.546180	 ,-5.855492	 ,-6.007435	 ,-6.020591	 ,-6.020740	])
AVCMmultrho = array([-1.478114 ,13.735044	 ,5.666820	 ,1.113518	 ,0.982343	 ,0.970497	 ,0.979764	 ,0.989406	 ,1.001047	 ,1.014948	 ,1.013616	 ,1.003464	])
AVCMmulterr = array([0.500000 ,0.113172	 ,0.045000	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.004532	 ,0.000051	])
AVCMmultdelta = array([0.150000 ,0.045000	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	])
AVCMmultfscaled = array([3.027210 ,2.754860	 ,2.497589	 ,2.260311	 ,2.046690	 ,1.859174	 ,1.699055	 ,1.566568	 ,1.461004	 ,1.380842	 ,1.323895	 ,1.287463	 ,1.268477	 ,1.263657	 ,1.269641	 ,1.283118	 ,1.300939	 ,1.320207	 ,1.338354	 ,1.353198	 ,1.362973	 ,1.366351	 ,1.362434	 ,1.350744	 ,1.331184	 ,1.304004	 ,1.269745	 ,1.229191	 ,1.183311	 ,1.133206	 ,1.080059	 ,1.025098	 ,0.969555	 ,0.914646	 ,0.861558	 ,0.811443	 ,0.765419	 ,0.724577	 ,0.689987	 ,0.662692	 ,0.643697	 ,0.633923	 ,0.634144	 ,0.644878	 ,0.666249	 ,0.697807	 ,0.738338	 ,0.785670	 ,0.836520	 ,0.886418	 ,0.929754	 ,0.959966	 ,0.969901	 ,0.952297	 ,0.900352	 ,0.808269	 ,0.671685	 ,0.487894	 ,0.255852	 ,-0.023991	 ,-0.349912	 ,-0.719056	 ,-1.127427	 ,-1.569767	 ,-2.039431	 ,-2.528365	 ,-3.027209	 ,-3.525473	 ,-4.011720	 ,-4.473757	 ,-4.898854	 ,-5.273994	 ,-5.586158	 ,-5.822609	 ,-5.971199	 ,-6.020683	 ,-5.961019	 ,-5.783713	 ,-5.482248	 ,-5.052586	 ,-4.493608	 ,-3.807268	 ,-2.998360	 ,-2.073925	 ,-1.042490	 ,0.086610	 ,1.303672	 ,2.598748	 ,3.961495	 ,5.380844	 ,6.844609	 ,8.339125	 ,9.848991	 ,11.356944	 ,12.843888	 ,14.289056	 ,15.670302	 ,16.964490	 ,18.147966	 ,19.197091	])
AVCMmultxHist = array([0.500000 ,0.000000	 ,0.613172	 ,0.658172	 ,0.671672	 ,0.685172	 ,0.698672	 ,0.712172	 ,0.725672	 ,0.739172	 ,0.752672	 ,0.757203	 ,0.757254	])
AVCMmultfHist = array([0.909297 ,3.027210	 ,-0.605496	 ,-2.607273	 ,-3.274860	 ,-3.931378	 ,-4.548323	 ,-5.095360	 ,-5.541404	 ,-5.855820	 ,-6.009701	 ,-6.020739	 ,-6.020740	])
#===== AVCMhybr =====
AVCMhybrfHighEval = 16
AVCMhybrfLowEval = 79
AVCMhybrnIter = 7
AVCMhybrx0 = array([0.122099 ,-0.000000	 ,0.272099	 ,0.167099	 ,0.135599	 ,0.143248	 ,0.142556	])
AVCMhybrfh = array([-0.915964 ,3.027210	 ,-0.090502	 ,-0.906722	 ,-0.978619	 ,-0.986260	 ,-0.986325	])
AVCMhybrfl = array([1.518810 ,2.513605	 ,3.131541	 ,1.883431	 ,1.595483	 ,1.652853	 ,1.647286	])
AVCMhybrfs = array([-0.649378 ,-1.193073	 ,-2.554572	 ,-1.199691	 ,-0.970700	 ,-0.987782	 ,-0.986333	])
AVCMhybrrho = array([1.171033 ,-14.229679	 ,-0.503758	 ,-0.032574	 ,1.144667	 ,0.833827	 ,0.890592	])
AVCMhybrerr = array([0.377901 ,0.122099	 ,0.150000	 ,0.045000	 ,0.013500	 ,0.007649	 ,0.000692	])
AVCMhybrdelta = array([0.500000 ,0.150000	 ,0.045000	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.013500	])
AVCMhybrfscaled = array([3.027210 ,2.505341	 ,2.000549	 ,1.521981	 ,1.077221	 ,0.672085	 ,0.310524	 ,-0.005314	 ,-0.274838	 ,-0.498610	 ,-0.677885	 ,-0.814249	 ,-0.909497	 ,-0.965808	 ,-0.986131	 ,-0.974551	 ,-0.936383	 ,-0.877848	 ,-0.805388	 ,-0.724855	 ,-0.640858	 ,-0.556466	 ,-0.473314	 ,-0.391993	 ,-0.312547	 ,-0.234924	 ,-0.159270	 ,-0.086029	 ,-0.015898	 ,0.050309	 ,0.111838	 ,0.168137	 ,0.218960	 ,0.264399	 ,0.304879	 ,0.341095	 ,0.373948	 ,0.404454	 ,0.433672	 ,0.462638	 ,0.492309	 ,0.523531	 ,0.557015	 ,0.593318	 ,0.632842	 ,0.675822	 ,0.722322	 ,0.772224	 ,0.825216	 ,0.880777	 ,0.938164	 ,0.996411	 ,1.054330	 ,1.110539	 ,1.163496	 ,1.211554	 ,1.253034	 ,1.286306	 ,1.309880	 ,1.322497	 ,1.323229	 ,1.311563	 ,1.287493	 ,1.251586	 ,1.205054	 ,1.149794	 ,1.088424	 ,1.024297	 ,0.961487	 ,0.904766	 ,0.859551	 ,0.831827	 ,0.828054	 ,0.855043	 ,0.919820	 ,1.029465	 ,1.190939	 ,1.410892	 ,1.695470	 ,2.050107	 ,2.479321	 ,2.986515	 ,3.573785	 ,4.241740	 ,4.989346	 ,5.813790	 ,6.710380	 ,7.672472	 ,8.691438	 ,9.756682	 ,10.855688	 ,11.974126	 ,13.096002	 ,14.203855	 ,15.279000	 ,16.301820	 ,17.252096	 ,18.109376	 ,18.853376	 ,19.464408	])
AVCMhybrxHist = array([0.500000 ,0.122099	 ,-0.000000	 ,0.272099	 ,0.167099	 ,0.135599	 ,0.143248	 ,0.142556	])
AVCMhybrfHist = array([0.909297 ,-0.915964	 ,3.027210	 ,-0.090502	 ,-0.906722	 ,-0.978619	 ,-0.986260	 ,-0.986325	])
#===== GVFMadd =====
GVFMaddfHighEval = 13
GVFMaddfLowEval = 80
GVFMaddnIter = 5
GVFMaddx0 = array([0.723652 ,0.760745	 ,0.758548	 ,0.757212	 ,0.757256	])
GVFMaddfh = array([-5.482310 ,-6.014149	 ,-6.019836	 ,-6.020739	 ,-6.020740	])
GVFMaddfl = array([4.048060 ,4.078884	 ,4.058463	 ,4.047328	 ,4.047677	])
GVFMaddfs = array([-1.972938 ,-6.078253	 ,-6.016495	 ,-6.020770	 ,-6.020740	])
GVFMaddrho = array([2.217587 ,0.892433	 ,2.424344	 ,0.966755	 ,0.987856	])
GVFMadderr = array([0.223652 ,0.037093	 ,0.002197	 ,0.001335	 ,0.000044	])
GVFMadddelta = array([0.150000 ,0.150000	 ,0.045000	 ,0.045000	 ,0.045000	])
GVFMaddfscaled = array([3.027210 ,2.706953	 ,2.388864	 ,2.077769	 ,1.777896	 ,1.492825	 ,1.225466	 ,0.978042	 ,0.752098	 ,0.548523	 ,0.367588	 ,0.209000	 ,0.071956	 ,-0.044777	 ,-0.142784	 ,-0.223925	 ,-0.290238	 ,-0.343864	 ,-0.386952	 ,-0.421588	 ,-0.449716	 ,-0.473076	 ,-0.493146	 ,-0.511101	 ,-0.527781	 ,-0.543670	 ,-0.558892	 ,-0.573222	 ,-0.586101	 ,-0.596676	 ,-0.603843	 ,-0.606303	 ,-0.602629	 ,-0.591340	 ,-0.570976	 ,-0.540188	 ,-0.497813	 ,-0.442966	 ,-0.375115	 ,-0.294154	 ,-0.200470	 ,-0.094996	 ,0.020752	 ,0.144650	 ,0.273971	 ,0.405398	 ,0.535069	 ,0.658647	 ,0.771407	 ,0.868355	 ,0.944360	 ,0.994307	 ,1.013261	 ,0.996638	 ,0.940378	 ,0.841103	 ,0.696268	 ,0.504294	 ,0.264667	 ,-0.021981	 ,-0.353821	 ,-0.727801	 ,-1.139640	 ,-1.583846	 ,-2.053732	 ,-2.541464	 ,-3.038096	 ,-3.533641	 ,-4.017148	 ,-4.476824	 ,-4.900193	 ,-5.274315	 ,-5.586068	 ,-5.822487	 ,-5.971165	 ,-6.020683	 ,-5.961055	 ,-5.784149	 ,-5.484064	 ,-5.057418	 ,-4.503549	 ,-3.824590	 ,-3.025451	 ,-2.113683	 ,-1.099265	 ,0.005672	 ,1.187170	 ,2.429780	 ,3.716912	 ,5.031166	 ,6.354650	 ,7.669272	 ,8.957015	 ,10.200185	 ,11.381647	 ,12.485047	 ,13.495017	 ,14.397382	 ,15.179356	 ,15.829732	])
GVFMaddxHist = array([0.000000 ,0.600000	 ,1.000000	 ,0.500000	 ,0.723652	 ,0.760745	 ,0.758548	 ,0.757212	 ,0.757256	])
GVFMaddfHist = array([3.027210 ,-0.149438	 ,15.829732	 ,0.909297	 ,-5.482310	 ,-6.014149	 ,-6.019836	 ,-6.020739	 ,-6.020740	])
#===== GVFMmult =====
GVFMmultfHighEval = 17
GVFMmultfLowEval = 114
GVFMmultnIter = 7
GVFMmultx0 = array([0.647482 ,0.797482	 ,0.838738	 ,0.766030	 ,0.752530	 ,0.757145	 ,0.757228	])
GVFMmultfh = array([-2.087906 ,-5.075375	 ,-1.991737	 ,-5.978567	 ,-6.009014	 ,-6.020734	 ,-6.020740	])
GVFMmultfl = array([5.135899 ,4.842165	 ,6.714038	 ,4.138959	 ,4.015735	 ,4.046793	 ,4.047454	])
GVFMmultfs = array([-0.300796 ,-6.018446	 ,-5.580436	 ,-5.510624	 ,-6.094596	 ,-6.019589	 ,-6.020739	])
GVFMmultrho = array([2.476838 ,0.760066	 ,-6.105485	 ,2.075116	 ,0.262407	 ,1.108342	 ,1.288506	])
GVFMmulterr = array([0.147482 ,0.150000	 ,0.041257	 ,0.031451	 ,0.013500	 ,0.004615	 ,0.000083	])
GVFMmultdelta = array([0.150000 ,0.150000	 ,0.045000	 ,0.013500	 ,0.013500	 ,0.013500	 ,0.004050	])
GVFMmultfscaled = array([3.027210 ,2.489968	 ,1.998530	 ,1.556386	 ,1.163649	 ,0.817385	 ,0.512054	 ,0.240035	 ,-0.007788	 ,-0.241414	 ,-0.471096	 ,-0.706749	 ,-0.957397	 ,-1.230697	 ,-1.532556	 ,-1.866847	 ,-2.235250	 ,-2.637195	 ,-3.069928	 ,-3.528679	 ,-4.006913	 ,-4.496659	 ,-4.988888	 ,-5.473915	 ,-5.941804	 ,-6.382756	 ,-6.787451	 ,-7.147328	 ,-7.454796	 ,-7.703357	 ,-7.887653	 ,-8.003431	 ,-8.047452	 ,-8.017355	 ,-7.911514	 ,-7.728920	 ,-7.469117	 ,-7.132234	 ,-6.719135	 ,-6.231715	 ,-5.673320	 ,-5.049280	 ,-4.367509	 ,-3.639064	 ,-2.878583	 ,-2.104461	 ,-1.338635	 ,-0.605884	 ,0.067426	 ,0.655131	 ,1.133473	 ,1.483493	 ,1.693284	 ,1.759719	 ,1.689251	 ,1.497497	 ,1.207465	 ,0.846544	 ,0.442683	 ,0.020392	 ,-0.402642	 ,-0.817540	 ,-1.224337	 ,-1.630057	 ,-2.045188	 ,-2.479355	 ,-2.937308	 ,-3.416254	 ,-3.905206	 ,-4.386438	 ,-4.838490	 ,-5.239710	 ,-5.571209	 ,-5.818392	 ,-5.970802	 ,-6.020676	 ,-5.961088	 ,-5.784662	 ,-5.483559	 ,-5.050872	 ,-4.482979	 ,-3.781990	 ,-2.957372	 ,-2.026080	 ,-1.011029	 ,0.061791	 ,1.166863	 ,2.282546	 ,3.393620	 ,4.492525	 ,5.579178	 ,6.659517	 ,7.743168	 ,8.840673	 ,9.960732	 ,11.107822	 ,12.280423	 ,13.469994	 ,14.660684	 ,15.829732	])
GVFMmultxHist = array([0.000000 ,0.600000	 ,1.000000	 ,0.500000	 ,0.647482	 ,0.797482	 ,0.838738	 ,0.766030	 ,0.752530	 ,0.757145	 ,0.757228	])
GVFMmultfHist = array([3.027210 ,-0.149438	 ,15.829732	 ,0.909297	 ,-2.087906	 ,-5.075375	 ,-1.991737	 ,-5.978567	 ,-6.009014	 ,-6.020734	 ,-6.020740	])
#===== GVFMhybr =====
GVFMhybrfHighEval = 15
GVFMhybrfLowEval = 123
GVFMhybrnIter = 6
GVFMhybrx0 = array([0.711308 ,0.816221	 ,0.749556	 ,0.759427	 ,0.757433	 ,0.757251	])
GVFMhybrfh = array([-5.063041 ,-3.939766	 ,-5.989854	 ,-6.018190	 ,-6.020722	 ,-6.020740	])
GVFMhybrfl = array([4.158940 ,5.559889	 ,4.001523	 ,4.066324	 ,4.049101	 ,4.047641	])
GVFMhybrfs = array([-1.020399 ,-6.970975	 ,-5.469497	 ,-6.036104	 ,-6.020185	 ,-6.020740	])
GVFMhybrrho = array([3.094964 ,-0.588739	 ,2.280234	 ,0.612668	 ,1.268950	 ,1.013263	])
GVFMhybrerr = array([0.211308 ,0.104914	 ,0.038249	 ,0.009871	 ,0.001995	 ,0.000181	])
GVFMhybrdelta = array([0.150000 ,0.045000	 ,0.013500	 ,0.013500	 ,0.004050	 ,0.004050	])
GVFMhybrfscaled = array([3.027210 ,2.627947	 ,2.254536	 ,1.910508	 ,1.597557	 ,1.315723	 ,1.063606	 ,0.838620	 ,0.637271	 ,0.455438	 ,0.288656	 ,0.132390	 ,-0.017718	 ,-0.165630	 ,-0.314731	 ,-0.467692	 ,-0.626371	 ,-0.791773	 ,-0.964042	 ,-1.142500	 ,-1.325722	 ,-1.511638	 ,-1.697659	 ,-1.880812	 ,-2.057885	 ,-2.225564	 ,-2.380556	 ,-2.519699	 ,-2.640045	 ,-2.738917	 ,-2.813941	 ,-2.863052	 ,-2.884481	 ,-2.876732	 ,-2.838559	 ,-2.768946	 ,-2.667118	 ,-2.532579	 ,-2.365198	 ,-2.165342	 ,-1.934052	 ,-1.673267	 ,-1.386060	 ,-1.076871	 ,-0.751695	 ,-0.418179	 ,-0.085594	 ,0.235372	 ,0.533014	 ,0.795208	 ,1.010187	 ,1.167414	 ,1.258477	 ,1.277863	 ,1.223487	 ,1.096872	 ,0.902879	 ,0.649019	 ,0.344399	 ,-0.001506	 ,-0.380035	 ,-0.784216	 ,-1.209138	 ,-1.651687	 ,-2.109713	 ,-2.580801	 ,-3.060977	 ,-3.543703	 ,-4.019446	 ,-4.475941	 ,-4.899061	 ,-5.273989	 ,-5.586318	 ,-5.822743	 ,-5.971212	 ,-6.020683	 ,-5.960852	 ,-5.782321	 ,-5.477559	 ,-5.042701	 ,-4.479855	 ,-3.799260	 ,-3.020485	 ,-2.171983	 ,-1.288630	 ,-0.407394	 ,0.438274	 ,1.224370	 ,1.941497	 ,2.598256	 ,3.222203	 ,3.858082	 ,4.563512	 ,5.402681	 ,6.438868	 ,7.726695	 ,9.305032	 ,11.191306	 ,13.377725	 ,15.829732	])
GVFMhybrxHist = array([0.000000 ,0.600000	 ,1.000000	 ,0.500000	 ,0.711308	 ,0.816221	 ,0.749556	 ,0.759427	 ,0.757433	 ,0.757251	])
GVFMhybrfHist = array([3.027210 ,-0.149438	 ,15.829732	 ,0.909297	 ,-5.063041	 ,-3.939766	 ,-5.989854	 ,-6.018190	 ,-6.020722	 ,-6.020740	])
#===== General =====
fhigh = array([3.027210 ,2.528364	 ,2.039407	 ,1.569686	 ,1.127299	 ,0.718997	 ,0.350132	 ,0.024637	 ,-0.254959	 ,-0.487485	 ,-0.673048	 ,-0.812929	 ,-0.909458	 ,-0.965863	 ,-0.986114	 ,-0.974752	 ,-0.936713	 ,-0.877155	 ,-0.801286	 ,-0.714204	 ,-0.620745	 ,-0.525356	 ,-0.431972	 ,-0.343935	 ,-0.263915	 ,-0.193872	 ,-0.135037	 ,-0.087912	 ,-0.052308	 ,-0.027391	 ,-0.011758	 ,-0.003527	 ,-0.000444	 ,0.000000	 ,0.000444	 ,0.003527	 ,0.011758	 ,0.027391	 ,0.052308	 ,0.087912	 ,0.135037	 ,0.193872	 ,0.263915	 ,0.343935	 ,0.431972	 ,0.525356	 ,0.620745	 ,0.714204	 ,0.801286	 ,0.877155	 ,0.936713	 ,0.974752	 ,0.986114	 ,0.965863	 ,0.909458	 ,0.812929	 ,0.673048	 ,0.487485	 ,0.254959	 ,-0.024637	 ,-0.350132	 ,-0.718997	 ,-1.127299	 ,-1.569686	 ,-2.039407	 ,-2.528364	 ,-3.027210	 ,-3.525472	 ,-4.011720	 ,-4.473757	 ,-4.898854	 ,-5.273994	 ,-5.586158	 ,-5.822609	 ,-5.971199	 ,-6.020683	 ,-5.961019	 ,-5.783676	 ,-5.481913	 ,-5.051049	 ,-4.488692	 ,-3.794943	 ,-2.972557	 ,-2.027052	 ,-0.966775	 ,0.197089	 ,1.450567	 ,2.777005	 ,4.157236	 ,5.569803	 ,6.991245	 ,8.396433	 ,9.758958	 ,11.051565	 ,12.246617	 ,13.316607	 ,14.234671	 ,14.975135	 ,15.514050	 ,15.829732	])
flow = array([2.513605 ,2.344990	 ,2.181320	 ,2.027267	 ,1.886882	 ,1.763539	 ,1.659914	 ,1.577975	 ,1.518985	 ,1.483530	 ,1.471557	 ,1.482424	 ,1.514968	 ,1.567574	 ,1.638256	 ,1.724745	 ,1.824573	 ,1.935160	 ,2.053903	 ,2.178252	 ,2.305789	 ,2.434292	 ,2.561792	 ,2.686618	 ,2.807437	 ,2.923266	 ,3.033492	 ,3.137862	 ,3.236472	 ,3.329739	 ,3.418363	 ,3.503287	 ,3.585637	 ,3.666667	 ,3.747697	 ,3.830046	 ,3.914970	 ,4.003594	 ,4.096861	 ,4.195471	 ,4.299842	 ,4.410067	 ,4.525897	 ,4.646715	 ,4.771542	 ,4.899041	 ,5.027544	 ,5.155082	 ,5.279431	 ,5.398173	 ,5.508760	 ,5.608588	 ,5.695077	 ,5.765760	 ,5.818365	 ,5.850909	 ,5.861776	 ,5.849803	 ,5.814348	 ,5.755358	 ,5.673419	 ,5.569795	 ,5.446452	 ,5.306066	 ,5.152014	 ,4.988343	 ,4.819728	 ,4.651405	 ,4.489090	 ,4.338879	 ,4.207139	 ,4.100377	 ,4.025103	 ,3.987686	 ,3.994198	 ,4.050265	 ,4.160905	 ,4.330384	 ,4.562074	 ,4.858314	 ,5.220301	 ,5.647983	 ,6.139984	 ,6.693545	 ,7.304491	 ,7.967231	 ,8.674778	 ,9.418806	 ,10.189729	 ,10.976821	 ,11.768350	 ,12.551752	 ,13.313823	 ,14.040934	 ,14.719268	 ,15.335071	 ,15.874911	 ,16.325951	 ,16.676217	 ,16.914866	])
x = linspace(0,1,100)


# rho
print '%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f'%(VCMaddrho[-1],VCMmultrho[-1],VCMhybrrho[-1],AVCMaddrho[-1],AVCMmultrho[-1],AVCMhybrrho[-1],GVFMaddrho[-1],GVFMmultrho[-1],GVFMhybrrho[-1])
print '%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f'%(VCMadddelta[-1],VCMmultdelta[-1],VCMhybrdelta[-1],AVCMadddelta[-1],AVCMmultdelta[-1],AVCMhybrdelta[-1],GVFMadddelta[-1],GVFMmultdelta[-1],GVFMhybrdelta[-1])
print '%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f'%(VCMaddx0[-1],VCMmultx0[-1],VCMhybrx0[-1],AVCMaddx0[-1],AVCMmultx0[-1],AVCMhybrx0[-1],GVFMaddx0[-1],GVFMmultx0[-1],GVFMhybrx0[-1])
print '%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f\t%.4f'%(VCMaddfh[-1],VCMmultfh[-1],VCMhybrfh[-1],AVCMaddfh[-1],AVCMmultfh[-1],AVCMhybrfh[-1],GVFMaddfh[-1],GVFMmultfh[-1],GVFMhybrfh[-1])

fig1 = plt.figure(1)
fig2 = plt.figure(2)
fig3 = plt.figure(3)

ax1 = fig1.add_subplot(111)
ax2 = fig2.add_subplot(111)
ax3 = fig3.add_subplot(111)

ax1.hold(True)
ax2.hold(True)
ax3.hold(True)

ax1.plot(x,fhigh,'r-',label='High fidelity',markevery=5,lw=2)
ax1.plot(x,flow,'bo-',label='Low fidelity',markevery=5,lw=2)
ax1.plot(x,VCMaddfscaled,'k--',label='scaled: additive')
ax1.plot(x,VCMmultfscaled,'k-',label='scaled: multiplicative')
ax1.plot(x,VCMhybrfscaled,'k-.',label='scaled: hybrid')
ax1.legend(loc='upper left')
ax1.set_title('VCM')
ax1.axis([0,1,-10,20])

ax2.plot(x,fhigh,'r-',label='High fidelity',markevery=5,lw=2)
ax2.plot(x,flow,'bo-',label='Low fidelity',markevery=5,lw=2)
ax2.plot(x,AVCMaddfscaled,'k--',label='scaled: additive')
ax2.plot(x,AVCMmultfscaled,'k-',label='scaled: multiplicative')
ax2.plot(x,AVCMhybrfscaled,'k-.',label='scaled: hybrid')
ax2.legend(loc='upper left')
ax2.set_title('AVCM')
ax2.axis([0,1,-10,20])

ax3.plot(x,fhigh,'r-',label='High fidelity',markevery=5,lw=2)
ax3.plot(x,flow,'bo-',label='Low fidelity',markevery=5,lw=2)
ax3.plot(x,GVFMaddfscaled,'k--',label='scaled: additive')
ax3.plot(x,GVFMmultfscaled,'k-',label='scaled: multiplicative')
ax3.plot(x,GVFMhybrfscaled,'k-.',label='scaled: hybrid')
ax3.legend(loc='upper left')
ax3.set_title('GVFM')
ax3.axis([0,1,-10,20])

plt.show()